﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace cmsservice.DAL
{
    public class CommDAL
    {
        public void AddMiniCount(string ip)
        {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("INSERT INTO [MiniCount]");
            sb.AppendLine("           ([IP]");
            sb.AppendLine("           ,[CTime])");
            sb.AppendLine("     VALUES");
            sb.AppendLine("           (@IP");
            sb.AppendLine("           ,@CTime)");
            Tools tool = new Tools();
            tool.AddSqlParameter("IP", System.Data.SqlDbType.VarChar, 20, ip);
            tool.AddSqlParameter("CTime", System.Data.SqlDbType.DateTime, DateTime.Now);
            SqlHelper.ExecuteNonQuery(DBConn.TemporaryDB, System.Data.CommandType.Text, sb.ToString(), tool.GetSqlParameters());
        }
    }
}
